package com.example.safeassistan.home.adapter;
import androidx.annotation.Nullable;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.safeassistan.R;
import com.example.safeassistan.home.model.AddScoreModel;
import com.example.safeassistan.home.model.InvestigationFinishMOdel;

import java.util.List;

public class PersonCommentAddAdapter extends BaseQuickAdapter<InvestigationFinishMOdel.ResultDTO.UserListDTO,BaseViewHolder>{
    public PersonCommentAddAdapter(@Nullable List<InvestigationFinishMOdel.ResultDTO.UserListDTO> data) {
        super(R.layout.item_person_comment_add, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, InvestigationFinishMOdel.ResultDTO.UserListDTO item) {


        if(item.getBodyStatus()==null){
            helper.setText(R.id.tvBodyScore,"请选择");
        }else {
            helper.setText(R.id.tvBodyScore,""+item.getBodyStatus());
        }

        if(item.getSpiritStatus()==null){
            helper.setText(R.id.tvEssenceScore,"请选择");
        }else {
            helper.setText(R.id.tvEssenceScore,""+item.getSpiritStatus());
        }


        helper.setText(R.id.tvUserName,item.getUserName());
        helper.addOnClickListener(R.id.llBody);
        helper.addOnClickListener(R.id.llEssence);
    }
}